package org.bonorsoft.modules.control.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Select;
import org.bonorsoft.modules.control.entity.Label;
import org.bonorsoft.modules.control.entity.Unit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 实有单位信息
 * @Author: WilliamYe
 * @Date:   2021-03-03
 * @Version: V1.0
 */
public interface UnitMapper extends BaseMapper<Unit> {

    @Select("select " +
            "l.label_id, l.label_name " +
            "from " +
            "police_label l " +
            "left join ybss_dw_sydw d " +
            "on d.bq like concat('%',concat(l.label_id,'%')) " +
            "where " +
            "d.dwdz_dzbm = #{dzbm}")
    List<Label> getLabel(String dzbm);
}
